"""
created  by  hzwlxy  at 2018/7/4 10:56
__author__: 西瓜哥
__QQ__ : 120235331
__Note__： 
"""

__author__ = '西瓜哥'

from app.ext import db
from app.models.base import Base


class Menu(Base):
    """
    后台菜单表
    """
    __tablename__ = "menus"

    name = db.Column(db.String(20), nullable=False, comment="菜单名称", unique=True)
    label = db.Column(db.String(20), nullable=True, comment="菜单说明")
    level = db.Column(db.Integer, default=0, comment="排序")
    pid = db.Column(db.Integer, default=0, comment="父级节点id")
    icon = db.Column(db.String(20), nullable=True, comment="图标")
    endpoint_name = db.Column(db.String(50), nullable=True, comment="endpoint名称")
    target = db.Column(db.Boolean, default=0, comment="新窗口打开")
